/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.college.service.persistence;

import com.college.model.University;

import com.liferay.portal.service.persistence.BasePersistence;

/**
 * The persistence interface for the university service.
 *
 * <p>
 * Never modify or reference this interface directly. Always use {@link UniversityUtil} to access the university persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
 * </p>
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author TransIT mPower Labs
 * @see UniversityPersistenceImpl
 * @see UniversityUtil
 * @generated
 */
public interface UniversityPersistence extends BasePersistence<University> {
	/**
	* Caches the university in the entity cache if it is enabled.
	*
	* @param university the university to cache
	*/
	public void cacheResult(com.college.model.University university);

	/**
	* Caches the universities in the entity cache if it is enabled.
	*
	* @param universities the universities to cache
	*/
	public void cacheResult(
		java.util.List<com.college.model.University> universities);

	/**
	* Creates a new university with the primary key. Does not add the university to the database.
	*
	* @param universityId the primary key for the new university
	* @return the new university
	*/
	public com.college.model.University create(long universityId);

	/**
	* Removes the university with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param universityId the primary key of the university to remove
	* @return the university that was removed
	* @throws com.college.NoSuchUniversityException if a university with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.college.model.University remove(long universityId)
		throws com.college.NoSuchUniversityException,
			com.liferay.portal.kernel.exception.SystemException;

	public com.college.model.University updateImpl(
		com.college.model.University university, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the university with the primary key or throws a {@link com.college.NoSuchUniversityException} if it could not be found.
	*
	* @param universityId the primary key of the university to find
	* @return the university
	* @throws com.college.NoSuchUniversityException if a university with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.college.model.University findByPrimaryKey(long universityId)
		throws com.college.NoSuchUniversityException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the university with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param universityId the primary key of the university to find
	* @return the university, or <code>null</code> if a university with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.college.model.University fetchByPrimaryKey(long universityId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds all the universities.
	*
	* @return the universities
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.college.model.University> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds a range of all the universities.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of universities to return
	* @param end the upper bound of the range of universities to return (not inclusive)
	* @return the range of universities
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.college.model.University> findAll(int start,
		int end) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds an ordered range of all the universities.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of universities to return
	* @param end the upper bound of the range of universities to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of universities
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.college.model.University> findAll(int start,
		int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the universities from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Counts all the universities.
	*
	* @return the number of universities
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;
}